package com.jy.rhin.support.parsing;

import com.jy.rhin.application.enums.DocumentTypeEnum;
import com.jy.rhin.facade.dto.DocumentModule;
import com.jy.rhin.facade.dto.TemplateRespDto;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description: 个人健康档案解析器
 * @Author: KaiLeZhou
 * @Date: 2:36 下午 2024/4/16
 * @Return:
 */

@Component
public class PersonalHealthRecordParser extends BaseDocumentParser {

    @Override
    public DocumentTypeEnum getDocumentType() {
        return DocumentTypeEnum.HEALTH_INFORMATION_REGISTRATION;
    }

    /**
     * 会诊记录文档解析
     *
     * @param json
     * @param templateRespList
     */
    @Override
    public List<TemplateRespDto> documentParsing(Object json, List<TemplateRespDto> templateRespList) {
        return null;
    }

    @Override
    public List<DocumentModule> createBodyModule() {
        List<DocumentModule> list = new ArrayList<>();
        //文档体模块
        list.add(new DocumentModule("实验室检查章节 ","/component/structuredBody/component/section/code[@code='30954-2']"));
        list.add(new DocumentModule("费用章节","/component/structuredBody/component/section/code[@code='48768-6']"));
        list.add(new DocumentModule("药物过敏史章节","/component/structuredBody/component/section/code[@code='48765-2']"));
        list.add(new DocumentModule("职业暴露史章节","/component/structuredBody/component/section/code[@code='10161-8']"));
        list.add(new DocumentModule("既往史章节","/component/structuredBody/component/section/code[@code='11348-0']"));
        list.add(new DocumentModule("家族史章节","/component/structuredBody/component/section/code[@code='10157-6']"));
        list.add(new DocumentModule("遗传病史章节","/component/structuredBody/component/section/code[@displayName='遗传病史']"));
        list.add(new DocumentModule("残疾史章节","/component/structuredBody/component/section/code[@code='8671-0']"));
        list.add(new DocumentModule("生活环境章节","/component/structuredBody/component/section/code[@displayName='生活环境']"));
        return list;
    }

}
